Repository navigation
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The launcher tests can intermittently read an empty PID file before writing completes, causing failures and leaving the waiting child process running.
1 open issue
What changed in this PR
Adds an opt-in durable handoff around the existing startup-readiness adapter, allowing cooperating hosts to claim one launch and recover persisted health status without retrying ambiguous launches. Existing updater, reporting, and rollback behavior remains unchanged.
Changes:
- Adds caller-selected attempt IDs and exclusive creation and launch claims.
- Covers launch competition, interrupted state, restart recovery, and explicit readiness with process tests and Windows Native AOT coverage.
- Documents recovery constraints and host-owned rollback responsibilities.
| File | Description |
|---|---|
| tests/StartupHealthProbe/Program.cs | Adds handoff host modes and a native readiness scenario. |
| tests/CoreTest/StartupHealth/StartupHealthHandoffTests.cs | Tests launch claims, recovery, failures, and readiness. |
| src/GeneralUpdate.Core/StartupHealth/StartupHealthStore.cs | Adds caller-selected IDs with exclusive creation claims. |
| src/GeneralUpdate.Core/StartupHealth/StartupHealthHandoff.cs | Introduces opt-in launch claiming and status observation. |
| docs/startup-health-store.md | Explains handoff usage, durability limits, and rollback boundaries. |
| .github/workflows/startup-health-aot.yml | Exercises the handoff in Windows Native AOT CI. |
Review effort: Balanced
| start.ArgumentList.Add(args[4]); | ||
| start.ArgumentList.Add("wait"); | ||
| using var child = handoff.Start(handoffId, start); | ||
| File.WriteAllText(args[3], child.Id.ToString()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Validation
dotnet test tests\CoreTest\CoreTest.csproj --filter "FullyQualifiedName~StartupHealth"— 25 passed, including real child processes, competing launchers, killed host recovery, incomplete state, timeout and disabled behavior.dotnet build src\GeneralUpdate.Core\GeneralUpdate.Core.csproj --no-restore— all target frameworks built.Boundaries
Based on #546 at
59af7951458727e128b440cab8a82eef0500dec2. No integration or combined validation was performed with Bowl.Host, #541 (623a87ce5112af0dab4d23c457797d23cd419143), or #543 (ad77b50c5125a436ab4d4c8a894f6df7235d95b0). Their file-application/process-alive outcomes are not business health.Core
AbstractStrategyrestores on certain application failures, while legacyBowlBootstrapcan separately restore after a captured crash when configured; a single owner across deployment paths is not established. This PR adds no restore. A host-owned durable update journal, exact snapshot association, process fencing, coordinated single rollback ownership, idempotent restoration and reporting remain future layers.